<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #app{
            position: relative;
            width: 300px;
            height: 300px;
            border: 1px solid;
        }

        #test{
            background: pink;

            position: absolute;
            left: 50%;
            top: 50%;
            transform: translateX(-50%) translateY(-50%);
        }
    </style>
</head>
<body>
    <div id="app">
        <div id="test">
            test test test <br>
            test test test <br>
            test test test <br>
            test test test <br>
        </div>
    </div>
</body>
</html>